package com.dao;

import com.domain.Member;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;

@Repository("memberDao")
public interface MemberDao {

     Member selectMemberById(Integer id);

    String selectMemberByuser_idAndspace_id(@Param("user_id")Integer user_id,@Param("space_id")Integer space_id);

     Member selectMemberByspace_id(Integer space_id);

     int insertMember(Member member);

    List<Member> findAllMember(@Param("from") int page, @Param("pageSize") int pageSize,@Param("space_id")int space_id);

    int findMemberTotal(@Param("space_id")int space_id);

    List<Member> selectAllMember(@Param("space_id")int space_id);

    List<Member> selectMemberByName(@Param("username")String username,@Param("space_id")int space_id);

    int updateMember(Member member);

    Member selectMemberById(int id);

    public int deleteById(@Param("space_id") Integer space_id, @Param("user_id") Integer user_id);

    int deleteAllMemberBySpaceId(int space_id);

    List<Member> selectMemberByUserId(@Param("user_id")int user_id);

    List<Member> descCreateDateByUserId(@Param("user_id") Integer user_id);

}
